<div class='uploader-block'>
    <div class='block-title'>{{ $title }}</div>
    <div class="block-file">
        @if ($office_file_type == \App\Models\DepartmentFile::OFFICE_FILE_TYPE_PPT)
            @php
                $filepath = $file && $file->ppt_filepath ? $file->ppt_filepath : '';
            @endphp
        @else
            @php
                $filepath = $file && $file->pdf_filepath ? $file->pdf_filepath : '';
            @endphp
        @endif
        @if (isset($file) && $filepath && file_exists(file_local_path($filepath)))
            <div>文件名称：{{ $origin_name }}</div>
            <div>
                @if ($office_file_type == \App\Models\DepartmentFile::OFFICE_FILE_TYPE_PDF)
                    <a href="javascript:void(0)" class="read-file" data-url="{{ admin_route('department.file.read', ['id' => $file->id, 'office_file_type' => $office_file_type]) }}">查看</a>
                @endif
                <a target="_blank" href="{{ admin_route('department.file.download', ['id' => $file->id, 'office_file_type' => $office_file_type]) }}">下载</a>
            </div>
        @else
            <div>文件名称：{{ $origin_name }}</div>
            <div>暂未上传</div>
        @endif
    </div>
    @if (isset($can_upload) && $can_upload)
        <div class="block-modal">
            {!! $modal->render() !!}
        </div>
    @endif
    
</div>